package com.CST.controller.cb;


import com.CST.common.api.ResultObject;
import com.CST.entity.cb.EtlEmployee;
import com.CST.service.cb.IEtlEmployeeService;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import io.swagger.annotations.*;
import java.util.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;

/**
* @author ly
* @since 2022-01-24
*/
@Api(tags = {"多角色工作系数员工基础表"})
@RestController
@RequestMapping("/etlEmployee")

    public class EtlEmployeeController {

    @Autowired
    private IEtlEmployeeService targetService;

    @PostMapping("/getEmployeename")
    @ApiOperation("获取下拉员工姓名")
    public ResultObject getEmployeeName(@RequestBody EtlEmployee info) {
        List<EtlEmployee> list = targetService.getEmployeeName(info);
        if (CollectionUtils.isEmpty(list)) {
            return ResultObject.successReturn(new ArrayList<>());
        }
        return ResultObject.successReturn(list);


    }
}

